function  [CNC_swork,RG_x]=put(i,CNC_swork)
    CNC_swork(i)=1;
    switch i
        case {1,2}
            i=1;
        case {3,4}
            i=2;
        case {5,6}
            i=3;
        case {7,8}
            i=4;
    end
    RG_x=i;
end